#pragma once

#include <sys/sysent.h>

// exploit is not a vital namespace
// it can be used freely instead of PS4_KERNELEL_EXECUTE_EXPLOIT_ ...

typedef enum
{
	PS4_EXPLOIT_STATUS_SUCCESS = 0,
	PS4_EXPLOIT_STATUS_FILE_DESCRIPTOR_RAISE_ERROR = -1,
	PS4_EXPLOIT_STATUS_INTERMEDIATE_ALLOCATION_ERROR = -2,
	PS4_EXPLOIT_STATUS_BUFFER_ALLOCATION_ERROR = -3,
	PS4_EXPLOIT_STATUS_OVERFLOW_ALLOCATION_ERROR = -4,
	PS4_EXPLOIT_STATUS_BUFFER_FREE_ERROR = -5,
	PS4_EXPLOIT_STATUS_MAP_ERROR = -6,
	PS4_EXPLOIT_STATUS_MUNMAP_SLOT_ERROR = -7,
	PS4_EXPLOIT_STATUS_INTERMEDIATE_FREE_ERROR = -8,
	PS4_EXPLOIT_STATUS_DLCLOSE_ERROR = -9,
	PS4_EXPLOIT_STATUS_OVERFLOW_FREE_ERROR = -10,
	PS4_EXPLOIT_STATUS_OVERFLOW_TRIGGER_ERROR = -11,
	PS4_EXPLOIT_STATUS_CLOSE_ERROR = -12,
	PS4_EXPLOIT_STATUS_MUNMAP_CLEAN_ERROR = -13,
}
Ps4ExploitStatus;

int ps4ExploitExecute(sy_call_t *call, void *uap, int64_t *ret0, int64_t *ret1, Ps4ExploitStatus *status);
